<?php
/**
 * Created by PhpStorm.
 * UsersF: Mloong
 * Date: 2018/12/13
 * Time: 16:14
 */

namespace app\admin\controller;


use think\facade\Request;
use app\admin\model\Grade as GradeModel;
class Grade extends BaseController
{
    public function fetch_add_grade()
    {
        return $this->fetch('grade/add_grade');
    }
    public function post_add_grade()
    {
        $post = Request::post();
        $result = GradeModel::addGrade($post);
        if (!$result){
            return $this->error('添加失败','/admin/Grade/fetch_add_grade');
        }
        return $this->success('添加成功','/admin/Grade/fetch_add_grade');
    }
}